Task Report Push
Register a callback, you will receive task report in real time.
To register a callback, you just need provide the callback.
The callback contains url and appId which is for authentication. The url like https://{{host}}/xx/xx
. The appId like "24416c36-d9c7-4d74-a047-d6ca461fxxxx". In addition, the http method should be post.
Then your callback will be invoked immediately when a task report is generated.
Demo curl:
curl --location 'https://{{host}}/xx/xx' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \
--data '{
"appId": "24416c36-aaaa-4d74-aaaa-d6ca461faaaa",
"payload": {
"serialNumber": "TEST00-0000-000-XXXX",
"modelTypeCode": "Scrubber S1",
"taskReport": {
"id": "684c183c-4ad9-467b-ac7c-55835255AAAA",
"taskId": "233123123-d9c7-4d74-a047-d6ca461faaaa",
"planId": "233123123-d9c7-4d74-a047-d6ca461faaaa",
"taskInstanceId": "893cbadf-3bb1-45be-b7ef-d590d54fAAAA",
"displayName": "ceshi2",
"startTime": 1714124784000,
"endTime": 1714124890000,
"robot": "S2153",
"robotSerialNumber": "TEST00-0000-000-xxxx",
"operator": "admin",
"completionPercentage": 0.156,
"durationSeconds": 106,
"plannedCleaningAreaSquareMeter": 67.425,
"actualCleaningAreaSquareMeter": 10.548,
"efficiencySquareMeterPerHour": 407.965,
"plannedPolishingAreaSquareMeter": null,
"actualPolishingAreaSquareMeter": null,
"waterConsumptionLiter": 0.0,
"startBatteryPercentage": 38.0,
"endBatteryPercentage": 38.0,
"consumablesResidualPercentage": {
"brush": 100.0,
"filter": 100.0,
"suctionBlade": 100.0
},
"cleaningMode": "清扫",
"taskEndStatus": 1,
"subTasks": [
{
"mapId": "370192bd-fe7f-40d0-8d0a-4360415bb8cf",
"mapName": "ceshi2",
"actualCleaningAreaSquareMeter": 10.548,
"taskId": "233123123-d9c7-4d74-a047-d6ca461faaaa"
}
],
"taskReportPngUri": "https://bot.release.gs-robot.com/robot-task/task/report/png/v2/en/684c183c-4ad9-467b-ac7c-55835255aaaa"
}
}
}'
Parameter description:
field name | field type | filed description | example |
---|---|---|---|
appId | String | for authentication | "24416c36-d9c7-4d74-a047-d6ca461fxxxx" |
payload | Object | incident message content | |
payload.serialNumber | String | robot serial number | "TEST00-0000-000-XXXX" |
payload.modelTypeCode | String | robot model type code | "Scrubber 50H" |
payload.taskReport | Object | task report | |
payload.taskReport.id | String | The task id | "24416c36-d9c7-4d74-a047-d6ca461faaaa" |
payload.taskReport.taskInstanceId | String | The task instance id. | "32803b4c-7a58-45c5-a1e4-e636e89baaaa" |
payload.taskReport.taskId | String | The static task id. | "32803b4c-7a58-45c5-a1e4-e636e89baaaa" |
payload.taskReport.planId | String | The scheduling plan id. | "32803b4c-7a58-45c5-a1e4-e636e89baaaa" |
payload.taskReport.displayName | String | Task human-readable name. | "Task on 10th floor" |
payload.taskReport.startTime | Long | Task start time. timestamp. unit: millisecond | 1714290913000 |
payload.taskReport.endTime | Long | Task end time. timestamp. unit: millisecond | 1714290952000 |
payload.taskReport.robot | String | Robot human-readable name. | "S2153" |
payload.taskReport.robotSerialNumber | String | The robot serial number | "GS000-XXXX-XXX-XXXX" |
payload.taskReport.operator | String | Task operator. | "Mike" |
payload.taskReport.completionPercentage | Double | Task completion percentage. range 0-1. | 0.55 |
payload.taskReport.durationSeconds | Integer | Task duration seconds. | 300 |
payload.taskReport.plannedCleaningAreaSquareMeter | Double | Planned cleaning area(m*2). | 200.5 |
payload.taskReport.actualCleaningAreaSquareMeter | Double | Actual cleaning area(m*2). | 100.2 |
payload.taskReport.efficiencySquareMeterPerHour | Double | Cleaning efficiency(m*2/h). | 300.7 |
payload.taskReport.plannedPolishingAreaSquareMeter | Double | Planned polishing area(m*2). | 200.5 |
payload.taskReport.actualPolishingAreaSquareMeter | Double | Actual polishing area(m*2). | 200.5 |
payload.taskReport.waterConsumptionLiter | Double | Water consumption(L) during task. | 5.0 |
payload.taskReport.startBatteryPercentage | Double | Task start battery percentage. range 0-100 | 70.0 |
payload.taskReport.endBatteryPercentage | Double | Task end battery percentage. range 0-100 | 40.0 |
consumablesResidualPercentage | Object | Percentage of consumables remaining | |
consumablesResidualPercentage.brush | Double | Brush remaining life percentage | 50.0 |
coumablesResidualPercentage.filter | Double | Filter remaining life percentage | 50.0 |
coumablesResidualPercentage.suctionBlade | Double | Suction blade remaining life percentage | 50.0 |
cleaningMode | String | The cleaning mode. | sweep |
taskEndStatus | Integer | Task end status. -1: unknown. 0: normal end. 1: manual end. 2: abnormal end. 3: startup failure | 0 |
subTasks | Array | Sub tasks list | |
subTasks[0].mapId | String | The map id. | "370192bd-fe7f-40d0-8d0a-4360415baaaa" |
subTasks[0].mapName | String | The map name. | "test_map" |
subTasks[0].actualCleaningAreaSquareMeter | Double | Actual cleaning area(m*2). | 10.0 |
subTasks[0].taskId | Double | The sub task Id. | "32803b4c-7a58-45c5-a1e4-e636e89baaaa" |
taskReportPngUri | String | The task report png uri. | "https://bot.gs-robot.com/robot-task/task/report/png/v2/en/47e3628b-a2b9-4124-bbbc-45e0d4bfaaaa" |